Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
init_apic_mappings();
#endif
#endif
+#if defined(CONFIG_XEN) && defined(CONFIG_SMP) && !defined(CONFIG_HOTPLUG_CPU)
+ prefill_possible_map();
+#endif
#if defined(CONFIG_XEN_PRIVILEGED_GUEST) || !defined(CONFIG_XEN)
/*
* Initialize the per-CPU GDT with the boot GDT,
* and set up the GDT descriptor:
*/
+#ifndef CONFIG_XEN
if (cpu)
memcpy(cpu_gdt(cpu), cpu_gdt_table, GDT_SIZE);
+#endif
cpu_gdt_descr[cpu].size = GDT_SIZE;
#ifndef CONFIG_XEN
unsigned int maxcpus = NR_CPUS;
#endif
+void __init prefill_possible_map(void)
+{
+ int i, rc;
+
+ for (i = 0; i < NR_CPUS; i++) {
+ rc = HYPERVISOR_vcpu_op(VCPUOP_is_up, i, NULL);
+ if (rc == -ENOENT)
+ break;
+ cpu_set(i, cpu_possible_map);
+ }
+}
+
void __init smp_alloc_memory(void)
{
}